<script src="Libraries/js/js.js"></script>
<script language="javascript">
function getValue(id){
	document.fmkhoa.ma_khoa.value=document.getElementById("ma_khoa" + id).innerHTML;
	document.fmkhoa.ten_khoa.value=document.getElementById("ten_khoa" + id).innerHTML;
}
function CalcKeyCode(aChar) {
  var character = aChar.substring(0,1);
  var code = aChar.charCodeAt(0);
  return code;
}

function checkNumber(val) {
  var strPass = val.value;
  var strLength = strPass.length;
  var lchar = val.value.charAt((strLength) - 1);
  var cCode = CalcKeyCode(lchar);
  if (cCode < 48 || cCode > 57 ) {
    var myNumber = val.value.substring(0, (strLength) - 1);
    val.value = myNumber;
  }
  return false;
}
function checkField(){
	if (document.fmkhoa.ma_khoa.value=="" || document.fmkhoa.ten_khoa.value=="" ){
		alert("Có một vài dữ liệu còn trống !!!");
		return false;
	}
	return true;
}
</script>
<?php
include_once('Models/NganhHoc.php');
?>

<table align="center" class="font" width="500px" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class=main_1><img border="0" src="Libraries/images/tbl_left.gif" width="10" height="25" /></td>
    <td align=center class=main_1>Cập Nhật Đề Cương Chi Tiết HP </td>
    <td class=main_1><p align="right"><img border="0" src="Libraries/images/tbl_right.gif" width="10" height="25" /></p></td>
  </tr>
  <tr bgcolor="#dae9f3">
    <td class="border_1" colspan="3" valign="top">
        <form name="xemdecuong" method="POST">
            <table border="0" align="center"  >
                <tr>
                    <td >&nbsp;</td>
                    <td >&nbsp;</td>
                </tr>
                <tr>
                    <td align=right><label>Ngành học </label></td>
                    <td>
                        <select name="cbonganh" onchange="hienThiHPTheoNganh(this.value);">
                            <option value=" ">Chọn ngành</option>
                            <?php
                                $nganh = new NganhHoc();
                                
                                $result = $nganh->dsTatCaNganh();
                                while ($rows=mysql_fetch_array($result)){
                                    echo "<option value=".$rows['manganh']."";
				
				                    echo ">".$rows['tennganh']."</option>";
                                }
		
			
                            ?>
                        </select>
                    </td>
                </tr>
                <tr>
          	        <td align=right><label>Học phần: </label></td>
                    <td>
                        <div id="hocphan">
                            <select name="cbohp">
                                <option value=" ">Chọn học phần</option>
                                <?php
                                    $result = $decuong->dsHocPhan();
                                    while ($rows=mysql_fetch_array($result)){
                                        echo "<option value=".$rows['mahp']."";
    				
    				                    echo ">".$rows['tenhp']."</option>";
                                    }
    		
    			
                                ?>
                            </select>
                        </div>
                    </td>
                </tr>
                <tr>
              	     <td align=center colspan="2">
                       <input type="submit" name="btnthem" value="Thêm" class="button_1"/>
                       <input type="submit" name="btnsua" value="Sửa" class="button_1"/>
                       <input type="submit" name="btnxoa" value="Xóa" class="button_1"/>
                    </td>
                </tr>
            </table>
        </form>
           

    </td>
  </tr>
</table>


</form>
